import request from '@/utils/request'

const urlApi = '/canshu'

// 查询字典
export function getDictData() {
  return request({
    url: urlApi + '/dict',
    method: 'get'
  })
}

// 自定义分页接口
export function pageDomain(query) {
  return request({
    url: urlApi + '/page',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getDomain(id) {
  return request({
    url: urlApi + '/id/' + id,
    method: 'get'
  })
}

// 修改
export function saveDomain(data) {
  return request({
    url: urlApi + '/save',
    method: 'put',
    data: data
  })
}

// 修改
export function disabledDomain(id) {
  return request({
    url: urlApi + '/disabled',
    method: 'put',
    data: { id: id }
  })
}

// 删除
export function delDomain(id) {
  return request({
    url: urlApi + '/remove?ids=' + id,
    method: 'delete'
  })
}

